package main

import (
	"github.com/gin-gonic/gin"
	"pay/alipay"
	"pay/config"
	"pay/router"
	"pay/util"
	"pay/wechatpay"
)

func main() {
	config.Init("config.yaml")
	var wechatPayConfig = wechatpay.WechatPayConfig{}
	wechatPayConfig.Init()
	var alipayConfig = alipay.AlipayConfig{}
	alipayConfig.Init()
	r := gin.Default()
	r.Use(gin.CustomRecovery(util.Recovery))
	router.Api(r)
	r.Run(":" + config.Config.Port)
}
